package com.bl.student.dao.model.custom;

import com.bl.student.common.enums.PointType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by liangweikang on 18/7/21.
 */
@Entity
@Data
@Table(name = "USER_POINT")
@ApiModel(value = "UserPointEntity", description = "用户投票")
@DynamicInsert
@DynamicUpdate
public class UserPointEntity {

    @Id
    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "创建时间")
    @Column(name = "user_id")
    private String userId;

    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "使用类型 REGISTER 注册 LOGIN 登录 COMMENT 评论 VOTE 投票")
    private PointType type;

    @ApiModelProperty(value = "创建时间")
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "创建时间")
    @Column(name = "update_time")
    private Date updateTime;

    @ApiModelProperty(value = "是否为支出")
    @Column(name = "is_out")
    private String isOut;

    @ApiModelProperty(value = "计数")
    private int count;
}
